package com.importregistrar;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Arrays;

/**
 * @author fanxiao  2022/3/3
 * @since 1.0.0
 */
@Slf4j
public class AppStarter {

  public static void main(String[] args) {
	  log.info("-----------------");
	  AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
	  context.setBeanNameGenerator(new AppBeanNameGenerator());
	  context.register(AppConfig.class);
	  context.refresh();
	  log.info("-----------------");
	  for (String beanDefinitionName : context.getBeanDefinitionNames()) {
	  	log.info("{}", beanDefinitionName);
	  }
  }
}